import { SfsQueryParams } from '/@/api/system-mgmt/sfs-mgmt/model/sfsModel';
import { deployHttp } from '/@/utils/http/axios';
import { SecurityGroupListItem, SubnetListItem, VpcListItem } from '/@/api/system-mgmt/vpcInfo-mgmt/model/vpcInfoModel';

enum Api {
  GET_SECURITY_GROUP_LIST = '/v1/vpc/getSecurityGroupList',
  GET_SUBNET_LIST = '/v1/vpc/getSubnetList',
  GET_VPC_LIST = '/v1/vpc/getVpcList',
}

export const getVpcList = (params: SfsQueryParams) => {
  return deployHttp.get<VpcListItem[]>({
    url: Api.GET_VPC_LIST,
    params,
  });
};

export const getSubnetList = (params: SfsQueryParams) => {
  return deployHttp.get<SubnetListItem[]>({
    url: Api.GET_SUBNET_LIST,
    params,
  });
};

export const getSecurityGroupList = (params: SfsQueryParams) => {
  return deployHttp.get<SecurityGroupListItem[]>({
    url: Api.GET_SECURITY_GROUP_LIST,
    params,
  });
};
